/**
 * Copyright (c) 2018-2099, Chill Zhuang 庄骞 (bladejava@qq.com).
 * <p>
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 * <p>
 * http://www.apache.org/licenses/LICENSE-2.0
 * <p>
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package org.springblade.modules.restaurant.entity;

import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.springblade.core.mp.base.TenantEntity;

import java.io.Serial;
import java.math.BigDecimal;

/**
 * 货物采购汇总表实体类
 *
 * @author Blade
 * @since 2025-02-05
 */
@Data
@TableName("restaurant_commodity_summary")
@EqualsAndHashCode(callSuper = true)
@Schema(description = "货物采购汇总表")
public class CommoditySummary extends TenantEntity {

    @Serial
	private static final long serialVersionUID = 1L;

    /**
     * 采购日期 yyyy-MM-dd
     */
    @Schema(description = "采购日期")
    private String purchaseTime;
	/**
	 * 到货日期  yyyy-MM-dd
	 */
	@Schema(description = "到货日期")
    private String arrivalDate;
    /**
     * 采购类别ID
     */
    @Schema(description = "采购类别ID")
	@JsonSerialize(using = ToStringSerializer.class)
    private Long categoryId;
    /**
     * 类别名
     */
    @Schema(description = "类别名")
    private String categoryName;
    /**
     * 排序
     */
    @Schema(description = "排序")
    private Integer sort;
    /**
     * 采购商品ID
     */
    @Schema(description = "采购商品ID")
	@JsonSerialize(using = ToStringSerializer.class)
    private Long commodityId;
    /**
     * 货物名
     */
    @Schema(description = "货物名")
    private String commodityName;
    /**
     * 商品图
     */
    @Schema(description = "商品图")
    private String productPicture;
    /**
     * 数量
     */
    @Schema(description = "数量")
    private Integer number;
    /**
     * 实到数量
     */
    @Schema(description = "实到数量")
    private BigDecimal actualNumber;

	/**
	 * 数量差额
	 */
	@Schema(description = "数量差额")
	private BigDecimal difference;

    /**
     * 金额
     */
    @Schema(description = "金额")
    private BigDecimal amount;
    /**
     * 单价
     */
    @Schema(description = "单价")
    private BigDecimal unitPrice;
    /**
     * 单位
     */
    @Schema(description = "单位")
    private String unit;

	/**
	 * 分配状态 0 未分配 1 部分分配 2 全部分配
	 */
	@Schema(description = "分配状态 0 未分配 1 部分分配 2 全部分配")
	private Integer enterStatus;
	/**
	 * 备注
	 */
	@Schema(description = "备注")
	private String remark;

	/**
	 * 是否补单: 0 否 1 是
	 */
	@Schema(description = "是否补单: 0 否 1 是")
	private Integer isReplacement;
}
